<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>生成企业二维码</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/company/qrCode.json" method="post">
<div class="form">
	<div class="title">生成企业二维码</div>
	<div class="group">
		<div class="label">所属地区编码:</div>
		<div class="text" name="groupid">${company.groupid }</div>
	</div>
	
	<div class="group">
		<div class="label">企业编码:</div>
		<input type="text" name="qrCode" id="qrCode" />
	</div>
	
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="groupid" name="groupid" value="${company.groupid }" />
		<input type="hidden" id="companyid" name="companyid" value="${company.companyid}" />
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "修改企业信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
/* 	$("#companyCoords").click(function(){
		$.ligerDialog.open({
            top:20,
            width: 750,
            height: 530,
            title: "选择企业坐标 - 拖动标注点确定企业位置",
            url: "${path}/company/setMapCompany.do?companyid=${company.companyid}",
            data: {
            	lng: $("#lng").val(),
            	lat: $("#lat").val()
            },
            onClose:function(){
            	var dialogData = this.get('data');
            	if(dialogData.newLng){
            		$("#lng").val(dialogData.newLng);
            		$("#lat").val(dialogData.newLat);
            		setCompanyCoords();
            	}
            }
        });
	}); */
	
});
function setCompanyCoords(){
	var lng = $("#lng").val();
	if(lng){
		$("#companyCoords").val("经度："+lng+"；纬度："+$("#lat").val());
	}else{
		$("#companyCoords").val('');
	}
}
</script>
</body>
</html>